package com.atguigu.gmall.realtime.function;

import com.atguigu.gmall.realtime.util.AtguiguUtil;
import org.apache.flink.table.functions.TableFunction;

import java.util.Set;

/**
 * @Author lzc
 * @Date 2022/12/10 09:17
 */
public class MySplit extends TableFunction<String> {
    public void eval(String keyword){
        // "华为手机白色 256g 手机手机手机手机手机手机手机手机"
       Set<String> kws = AtguiguUtil.ikAnalyze(keyword);
        for (String kw : kws) {
            collect(kw);
        }
    }
}
